<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        function checkType(callback){
            if("当前浏览器是IE"){
                callback();
            }
        }
        checkType(()=>{
            console.log("110 这里有一个IE浏览器");
        })
        function handler(type){
            return function(e){
                if(type==="ie"){
                    console.log("慢走");
                }else{
                    console.log("欢迎光临")
                }
            }
        }
        document.onclick = handler("chrome");
    </script>
</body>
</html>